package com.zmn.plat.services.impl.service.citygroup;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zmn.plat.model.entity.service.tariff.citygroup.ServiceTariffCityGroup;
import com.zmn.plat.model.entity.service.tariff.citygroup.ServiceTariffCityGroupQuery;
import com.zmn.plat.persistence.interfaces.service.tariff.citygroup.ServiceTariffCityGroupDao;
import com.zmn.plat.services.interfaces.service.tariff.citygroup.ServiceTariffCityGroupService;

/**
 * @author tanbiao
 * @description
 * @since 2020/5/28 14:57
 * @modifier
 **/
@Service
public class ServiceTariffCityGroupServiceImpl implements ServiceTariffCityGroupService {
    @Resource
    private ServiceTariffCityGroupDao faultCityGroupDao;

    @Override
    public ServiceTariffCityGroup findByKey(Integer groupId) {
        return faultCityGroupDao.findByKey(groupId);
    }

    @Override
    public List<ServiceTariffCityGroup> listPageByQuery(ServiceTariffCityGroupQuery query) {
        int count = countByQuery(query);
        query.setTotalCount(count);
        return faultCityGroupDao.listPageByQuery(query);
    }

    @Override
    public List<ServiceTariffCityGroup> listByQuery(ServiceTariffCityGroupQuery query) {
        return faultCityGroupDao.listByQuery(query);
    }

    @Override
    public List<ServiceTariffCityGroup> listAll() {
        return faultCityGroupDao.listAll();
    }

    @Override
    public Integer countByQuery(ServiceTariffCityGroupQuery query) {
        return faultCityGroupDao.countByQuery(query);
    }

    @Override
    public Integer updateByKey(ServiceTariffCityGroup faultCityGroup) {
        return faultCityGroupDao.updateByKey(faultCityGroup);
    }

    @Override
    public Integer insert(ServiceTariffCityGroup faultCityGroup) {
        return faultCityGroupDao.insert(faultCityGroup);
    }

    @Override
    public Integer deleteByKey(Integer groupId) {
        return faultCityGroupDao.deleteByKey(groupId);
    }
}
